package org.wisigoth.chat.client;

import org.wisigoth.chat.client.Session.ConnectionState;
import org.wisigoth.chat.client.exceptions.AccountCreationException;
/**
 * Wisigoth manage a Wisigoth Session.
 * It should have a unique instance
 * @author tof
 *
 */
public interface Wisigoth {
	 
	/**
	 * Create a new Session in a default {@link ConnectionState#OFFLINE} state.
	 * @return
	 */
	public Session createSession();
/**
 * Create a new Wisigoth account with the given string username (login)	and array of char password.
 * If the username laready exists, the method throws a {@link AccountCreationException}
 * @param login
 * @param password
 * @throws AccountCreationException
 */
	public void accountCreationRequest(String login,char[] password) throws AccountCreationException;
	
	/**
	 * Get the user preferences
	 * @return a non null UserPreferences object
	 */
	public UserPreferences getUserPreferences();

	public void close();
}
